<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        button {
            width: 100px;
            height: 100px;
            border: 1px solid pink;
        }
    </style>

</head>

<body>
<button id="scan">scan</button>
<button id="location">Location</button>
<script>

        document.querySelector('#scan').onclick = function () {
            window.android.scan()
        }

        document.querySelector('#location').onclick = function () {
            window.android.toLocation()
        }


</script>


</body>

</html>